package com.example.designpatten.chapter6_decoratorpattern;

import java.util.Objects;

//装扮父类
public abstract class Finery extends Person {
    protected Person instance;
    //打扮
    public void decorate(Person instance) {
        this.instance = instance;
    }

    @Override
    public void show() {
        if (!Objects.isNull(instance)) {
            instance.show();
        }
    }
}
